//
//  BaseTableView.h
//  HuairouInsight
//
//  Created by xiangming on 14-5-4.
//  Copyright (c) 2014年 elitework. All rights reserved.
//

#import <Foundation/Foundation.h>


//表视图刷新通知
#define kReloadWeiboTableNotification @"kReloadWeiboTableNotification"

#import <UIKit/UIKit.h>
#import "EGORefreshTableHeaderView.h"

@class BaseTableView;
//定义微博列表事件处理协议方法，区分什么时候上拉刷新，什么时候下拉刷新，什么时候选中后跳转
@protocol UITableViewEventsDelegate<NSObject>

@optional
- (void)pullUp:(BaseTableView *)baseTableView;
- (void)pullDown:(BaseTableView *)baseTableView;
- (void)basetableView:(BaseTableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath;

@end

@interface BaseTableView : UITableView<UITableViewDelegate, UITableViewDataSource,EGORefreshTableHeaderDelegate>

@property (nonatomic, retain) NSArray *data;    //数据源
@property (nonatomic, retain) EGORefreshTableHeaderView *refreshHeaderView;//下拉刷新视图
@property (nonatomic, assign) BOOL reloading;   //是否正在下载标识
@property (nonatomic, assign) BOOL isNeedTorefresh; //是否需要刷新
@property (nonatomic, assign) id<UITableViewEventsDelegate> eventsDelegate;//事件处理代理对象
@property (nonatomic, assign) BOOL isMore;//是否能加载更多标识

@property (nonatomic, strong) UIButton *moreButton;//下拉刷新按钮

- (void)doneLoadingTableViewData;
- (void)refreshData;



@end
